<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  	<title>FTP日志管理</title>
  	<link rel="stylesheet" href="<%=path%>/css/public.css" type="text/css"  />
	<link rel="stylesheet" href="<%=path%>/css/module.css" type="text/css"  />
	<link rel="stylesheet" href="<%=path%>/css/skin_blue.css" type="text/css"  />
	<link rel="stylesheet" href="<%=path%>/js/FusionChartsFree/contents/Style.css" type="text/css" />
	<script language="JavaScript" src="<%=path%>/js/FusionChartsFree/JSClass/FusionCharts.js"></script>
	<script type="text/javascript" src="<%=path%>/js/jquery/jquery-1.8.0.min.js"></script>
	<script type="text/javascript" src="<%=path%>/js/DatePicker/WdatePicker.js""></script>
	<!--[if IE 6]> 
	<script src="../js/ie6comm.js"></script> 
	<script> 
	DD_belatedPNG.fix('img'); 
	</script> 
	<![endif]-->
	<script type="text/javascript">
		function drawGraph(){
			var chart = new FusionCharts("<%=path%>/js/FusionChartsFree/Charts/Pie3D.swf", "chart", "450", "250");
			var xml="<chart formatNumberScale='0' showBorder='0' bgColor='aa0077,000000' bgAngle='270' bgAlpha='10,10' palette='4' decimals='2' enableSmartLabels='1' enableRotation='0' startingAngle='70' baseFontSize='12' baseFont='宋体' numberSuffix=' MB' showValues='1' showPercentValues='0' labelSepChar=':'> ";
				<s:iterator value="chartData.key" status="st">
				xml+='<set value="<s:property value="chartData.value[#st.index]"/>" name="<s:property  escape="false"/>" />';
				</s:iterator>
			xml+='</chart>';
			chart.setDataXML(xml);					
			chart.render("chart");
		}
	</script>
  </head>
  
  <body style="overflow:auto;" onLoad="drawGraph();">
	    <div class="tab_cur">
	        	<p class="location"> <em>您的当前位置:&nbsp;&nbsp;</em><font color="blue">日志管理</font></p>
	    </div>
	    <s:form action="/stat!userList.action" method='post' theme="simple" name="form">
	    <div class="searchbox">
			  <p class="search_con">
                    <label>统计类型</label>
					<select id="statType" name="statType">
						<option value="0">
							用户
						</option>
						<option value="1">
							文件
						</option>
						<option selected="selected" value="2">
							IP地址
						</option>
					</select>
					
					<label>开始时间</label>
					<input id="startTime" name="startTime" value="<s:property value="%{#request.startTime}"  escape="false"/>" class="Wdate" type="text" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'endTime\')||\'%y-%M-{%d-1}\'||\'2020-10-01\'}'})"/>
					<label>结束时间</label>
					<input id="endTime" name="endTime"  value="<s:property value="%{#request.endTime}"  escape="false"/>" class="Wdate" type="text" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'startTime\')}',maxDate:'#F{\'%y-%M-{%d-1}\'||\'2020-10-01\'}'})"/>
				
					<button class="btn_cx" title="">查 询
					</button>
				</p>
				<p class="search_con">
					查询间隔:<s:property value="%{#request.startTime}"/> 00:00:00 to <s:property value="%{#request.endTime}"/> 23:59:59
				</p>
			</div>
		</s:form>
	<div id='chart' align='center'></div>
 	<div class="formbox">
		<table summary="" class="datelist"  width="100%">
				<thead>
					<tr>
						<th width="10%"><input type="checkbox" /></th>
						<td>主机IP</td>
						<td>连接次数</td>
						<td>下载文件数</td>
						<td>下载文件大小(MB)</td>
					<!--  <td>下载文件比例</td> -->	
						<td>上传文件数</td>
						<td>上传文件大小(MB)</td>
		<%--				<td>统计时间</td>--%>
					<!--	<td>上传文件比例</td> -->	
					</tr>
				</thead>
				<tbody>
					<s:iterator value="pageBean.list" var="user" status="st">
					<tr>
						<th ><input type="checkbox" /></th>
						<td><s:property value="ip" /></td>
						<td><s:property value="conn" /></td>
						<td><s:property value="downFile" /></td>
						<td><s:property value="downMb" /></td>
						<td><s:property value="upFile" /></td>
						<td><s:property value="upMb" /></td>
		<%--				<td><s:property value="statTime" /></td>--%>
					</tr>
					</s:iterator>
				</tbody>
		</table>
  <div class="pagination">
        <div class="pageleft">
          <!-- 全选反选位置 -->
          <div class="choose"> </div>
          <p class="pagenum">第<input type="text" value="1" style="color:red; text-align:center;width:20px;" />页 / 共<span class="red">10</span>页， 每页显示
            <input type="text" style="width:20px;" />
            条 /  共<span class="red">20</span>条记录 </p>
        </div>
        <div class="pageright">
          <!-- 分页位置 -->
          <div id="pagediv" class="paging"> <span id="pagelist" class="pagelist"></span> <a id="first" href="javascript:submitFirstPage()" class="first" title="首页">首　页</a> <a id="pre" href="javascript:submitPrePage()" class="prev" title="上一页">上一页</a> <a id="next" href="javascript:submitNextPage()" class="next" title="下一页">下一页</a> <a id="last" href="javascript:submitLastPage()" class="last" title="末页">末　页</a>
            <!-- 	 -->
          </div>
    </div>
  </div>
</div>
  </body>
</html>
